package com.mjlf.test_shiro.service;

import com.mjlf.test_shiro.entity.Person;
import org.springframework.stereotype.Service;

import javax.validation.Valid;
import java.util.ArrayList;
import java.util.List;

/**
 * @ClassName: PersonService
 * @Author: majun
 * @CreateDate: 2018/10/17 16:21
 * @Version: 1.0
 * @Description: TODO
 */

@Service
public class PersonService {

    public void addPerson(@Valid Person person){

        System.out.println("添加用户");
    }

    public void deletePerson(String id){
        System.out.println("成功删除用户");
    }

    public List<Person> queryPerson(){
        List<Person> peoples = new ArrayList<>();

        peoples.add(new Person());
        peoples.add(new Person());
        peoples.add(new Person());
        return peoples;
    }

    public Person getPerson(String name){
        Person person = new Person(name,name, "123456");
        return person;
    }
}
